const CopyWebpackPlugin = require('copy-webpack-plugin')
// const CopyWebpackPlugin = require('monaco-editor-webpack-plugin')
const path = require('path')
function resolve(dir) {
  return path.join(__dirname, dir)
}

module.exports = {
  context: path.resolve(__dirname, './'),
  resolve: {
    extensions: ['.js', '.vue', '.json'],
    alias: {
      '@': resolve('src')
      // '@assets': resolve('src/assets'),
      // // '@layouts': resolve('src/layouts'),
      // // '@pages': resolve('src/pages'),
      // '@comp': resolve('src/components'),
      // '@api': resolve('src/api'),
      // // '@plug': resolve('src/plugins'),
      // '@utils': resolve('src/utils'),
      // '@views': resolve('src/views')
    }
  },
  plugins: [
    new CopyWebpackPlugin([
      {
        from: 'node_modules/monaco-editor/min/vs',
        to: 'vs'
      }
    ])
  ]
}
